package com.lfy.modules.blog.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lfy.modules.blog.domain.RouteEntity;
import com.lfy.modules.blog.domain.vo.role.RouteTreeVO;
import com.lfy.modules.blog.domain.vo.role.SaveRouteByRoleDTO;
import com.lfy.modules.common.domain.R;

import java.util.List;
import java.util.Set;

/**
* @author 吕飞扬
* @description 针对表【route】的数据库操作Service
* @createDate 2024-04-03 01:14:11
*/
public interface RouteService extends IService<RouteEntity> {

    /**
     * 获取全部路由
     */
    R<List<RouteTreeVO>> getRouteTree();

    /**
     * 根据角色id获取全部路由
     */
    R<List<RouteTreeVO>> getRouteTreeListByRoleId(Long id);

    /**
     * 给角色新增路由
     * @return r
     */
    R<Void> addRouteByRoleId(SaveRouteByRoleDTO dto);

    /**
     * 根据角色删除路由
     */
    R<Void> removeRouteByRoleId(SaveRouteByRoleDTO dto);

    R<Set<Long>> getRouteIdByRoleId(Long id);
}
